package y23.Sep;
import java.util.Scanner;
public class test17 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            char[] ch = in.nextLine().toCharArray();
            String s = in.nextLine();
            for (int i = 0; i < ch.length; i++) {
                if (!s.contains(String.valueOf(ch[i]))) {
                    System.out.print(ch[i]);

                }
            }
        }
    }
}

